package org.rency.crawler.scheduler.support;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * 描述: ${TODO}<br>
 * 最近修改时间:2018/2/9 17:09<br>
 *
 * @author CaiyuRen
 * @version V1.0
 * @since 2018/2/9 17:09
 */
public class TaskSchedulerProperties {

  private int corePoolSize = Runtime.getRuntime().availableProcessors();

  private int maxPoolSize = corePoolSize * 1000;

  private int queueCapacity = maxPoolSize * 10;

  private String prefixName = "Crawler-Scheduler";

  public int getCorePoolSize() {
    return corePoolSize;
  }

  public void setCorePoolSize(int corePoolSize) {
    this.corePoolSize = corePoolSize;
  }

  public int getMaxPoolSize() {
    return maxPoolSize;
  }

  public void setMaxPoolSize(int maxPoolSize) {
    this.maxPoolSize = maxPoolSize;
  }

  public int getQueueCapacity() {
    return queueCapacity;
  }

  public void setQueueCapacity(int queueCapacity) {
    this.queueCapacity = queueCapacity;
  }

  public String getPrefixName() {
    return prefixName;
  }

  public void setPrefixName(String prefixName) {
    this.prefixName = prefixName;
  }

  @Override
  public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
  }

}
